package com.sunyuechao.syccloud.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.Map;

/**
 * Created by SunYuechao on 2022/6/28 下午5:15
 */
@Controller
@RequestMapping("/")
public class HtmlController {
    /*
     @RequestMapping("")
    public ModelAndView index(){
        ModelAndView index = new ModelAndView("index");
        index.addObject("name","孙越超");
        return index;
    }*/
    @RequestMapping("")
    public String index(Map<String,Object> map){
        map.put("hello","from TemplateController.helloHtml");
        map.put("name","syc");
        return"/index";
    }
}
